#include <stdio.h>
struct Employee /*declare a global structture type*/
{
    int idNum;
    double payRate;
    double hours;
};

double calcNet(struct Employee*); /*function prototype*/

int main()
{
    struct Employee emp = {6787, 8.93, 40.5};
    double netPay;

    netPay = calcNet(&emp); /*pass copies of the values in emp*/
    printf("The net pay of employee %d is %6.2f\n",
           emp.idNum, netPay);
    return 0;
}

double calcNet(struct Employee *pt)
/*temp is of data type struct Employee*/
{
    return (pt->payRate * pt->hours);
}